/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       dialog_combat_creature.h

	$Header: /game/dialog_combat_creature.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef DIALOG_COMBAT_CREATURE_H_INCLUDED
#define DIALOG_COMBAT_CREATURE_H_INCLUDED


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
#include "battlefield_ptr.h"
#include "bitmap_group_ptr.h"
#include "popup_window.h"
#include "skill_icon_ptr.h"
#include "text_window.h"
#include "text_window_ptr.h"

class t_button;
class t_combat_creature;
class t_luck_icon_window;
class t_morale_icon_window;
class t_scrollbar;
enum  t_spell;
class t_spell_icon_window;

// ---------------------------------------------------------------
// popup dialog to display info about a combat creature
// ---------------------------------------------------------------
class t_dialog_combat_creature : public t_popup_window
{
    enum
    {
	    k_max_skills_to_display = 5
    };
public:
	t_dialog_combat_creature( t_combat_creature const * creature,
							  t_battlefield_ptr battlefield,
							  t_screen_point const& point,
		                      t_window* parent, t_screen_rect const& client_rect );
protected:
	enum { k_spell_icon_count = 4 };

	void			close_click( t_button* button );
	virtual bool	children_handle_mouse();
	t_window*		create_bitmap( char const* name );
	void			create_spells( t_combat_creature const * creature );
    void			create_stats_icons();
    void			create_stats_text( t_combat_creature const * creature );
	void			create_text( char const* layer_name, std::string const& text,
							       t_justification justification = k_justify_left );
    void			create_text_window( char const* layer_name, 
								  std::string const&	text, 
								  int					font_size = 0,
								  t_justification		justification = k_justify_center,
								  std::string const&	help_text = "" );
	virtual void	on_close();
	void			show_cursed_spells( t_scrollbar*, int top_spell );
	void			show_blessed_spells( t_scrollbar*, int top_spell );

	t_bitmap_group_ptr 	    m_bitmaps;
	t_window*               m_background;
	t_battlefield_ptr		m_battlefield;
	std::vector<t_spell>    m_blessed_spells;
	t_spell_icon_window*    m_cursed_spell_windows[k_spell_icon_count];
	std::vector<t_spell>    m_cursed_spells;
	t_spell_icon_window*    m_blessed_spell_windows[k_spell_icon_count];
    t_luck_icon_window*     m_luck_icon;
    t_morale_icon_window*   m_morale_icon;
	t_screen_point          m_origin;
	t_skill_icon_ptr        m_skill_icons[k_max_skills_to_display];
};

#endif // DIALOG_COMBAT_CREATURE_H_INCLUDED
